#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <string.h>

void reverse(char* left, char* right)
{
    while (left < right)
    {
        char tmp = *left;
        *left = *right;
        *right = tmp;
        left++;
        right--;
    }
}
int main()
{
    char arr[1000] = "\0";
    scanf("%s", arr);
    int len = strlen(arr);
    reverse(arr, arr + len - 1);
    printf("%s", arr);
    return 0;
}